package role

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/permission"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/role"
)

type RoleServiceIface interface {
	// 新增/更新角色
	RoleSave(ctx context.Context, role *role.GfyRolePo) (int64, error)
	// 删除角色
	DeleteRole(ctx context.Context, roleId int64, operatorId int64) (int64, error)
	// 角色列表
	RoleList(ctx context.Context) ([]*role.GfyRolePo, error)
	// 角色增加权限
	AddPermissionsToRole(ctx context.Context, roleId int64, perIds []int64) error
	// 根据角色获取权限列表
	RolePermissionList(ctx context.Context, roleId int64) ([]*permission.GfyxPermission, error)
}
